<?php
/**
 * 团购活动拼团模板模型
 *
 *2017-01-09
 *
 *
 
 */
defined('InShopNC') or exit('Access Invalid!');

class groupbuy_team_templateModel extends Model{
    public function __construct(){
        parent::__construct('groupbuy_team_template');
    }
    
    /*
     * 保存团购活动模板
     */
    public function save_tempalte($data){
        return $this->table('groupbuy_team_template')->insert($data);
    }
    
    /*
     * 获得团购活动模板
     */
    public function get_template($condition){
        return $this->table('groupbuy_team_template')->where($condition)->find();
    }
    
    //更新
    
    public function update_team($condition,$update){
        $result=Model()->table('groupbuy_team_template')->where($condition)->update($update);
        return $result;
   }
    
    
}